# pwd = 3 > 1 and 2 or 2 < 3 and 3 and 4 or 3 > 2
# print(pwd)  # 输出2，因为and优先级大于or
# count = 2
# while count >= 0:
#     user_name = input("请输入用户名:")
# pwd = input("请输入密码:")
# if user_name == "youda" and pwd == "123":
#     print("欢迎登陆")
#     break
# template = "输入错误,还有%s次机会。" % (count,)
# print(template)
# count -= 1  # 使用字符串格式化，同时使用自减方法 解决用户登陆问题
# else:
# print("三次机会已用完")
# template = "ioPP"
# message = input("请输入验证码%s :" % (template,))
# ew_template = template.lower()
# wu_template = template.upper()
# if message == new_template or message == wu_template:
#     print("成功")
# elif not message == new_template or message == wu_template:
#     print("成功")
# else:
# print("错误，请重新输入)
# name = input("请输入姓名:")
# new_name = name.strip()
# print("-->", new_name, "<--")
# message = input("我：")
# new_message = message.replace("妈", "**", 12)
# print(new_message)
# message = "我今天吃了好多好吃的吼吼哈嘿，我好开心"
# template = message.split("吃")
# print(template)
# message = "我今天吃了好多好吃的吼吼哈嘿，我好开心"
# template = message.replace("吃", "2")  # 切割：括号中的内容处，进行切割并切割成列表 。这个1是从左到右找到第一个进行切割
# print(template)
# 输入一串字符串，并将其中的数字找到并打印出来
# name = input("请输入:")
# val_len = len(name)
# index = 0
# total = 0
# while True:
#     val = name[index]
#     flag = val.isdigit()
#     if flag:
#         total += 1
#     if index == val_len - 1:
#         break
#     index += 1
# print(total)
